package com.zhangbo.study.designpatternlearning.combination;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class PanckeHouseMenu {

    private List<MenuItem> menuItems;

    public PanckeHouseMenu() {
        this.menuItems = new ArrayList<>();
        addItem("K&B Pancake Breakfast","Pancakes with scrambled eggs, and toast",true,2.99);
        addItem("Regular Pancake Breakfast","Pancakes with fried eggs,sausage",true,3.49);
        addItem("Waffles","Waffles, with your choice of blueberries or strawberries",true,3.59);
    }


    public void addItem(String name,String description,boolean vegetarian,double price) {
        MenuItem menuItem = new MenuItem(name,description,vegetarian,price);
        this.menuItems.add(menuItem);
    }


    public List<MenuItem> getMenuItems() {
        return this.menuItems;
    }

    public Iterator<MenuItem> createIterator() {
        return new PanckeHouseMenuIterator(this.menuItems);
    }

}
